made groups be a map[string][]type
ditto
adding docs