refactored group collision example