changes to fix repeating groups