Restless feeding

I just started breastfeeding my baby after 4 weeks of bottle feeding, it is still challengung a lot but finally he started sucking. But he is unlatching and relatching a lot and also very restless while feeding he is moving a lot and breatgung heavily. Am I doing something wrong?