Mr. Gregory divided his class into groups. There were 6 groups of 4 and 1 group of 3. If Mr. Gregory wanted the same number of students in each group, how many students should be in each group? Show all your work.