group the name fields by prefix