correct indentation
correct english
improve determine_group_name
comment spliting for later understanding