make groups example pretty
refactor