fully working hook to add a group to a student