Behavior at home vs school

It is frustrating to see my son be very good at home and absolutely terrible at school.  I know he can do it, I just can't seem to find the motivation.  School has been out for a week now and he had the most perfect week at home.  I am dreading the 5th when he goes back. We started him on a new med last, hard to tell if it works or not since we do not usually have issues at home. he took it everyday last week and he said it didn't aggitate him, we didn't see any apparent side effects, hopefully this will be the one that is able to help him control his impulses!