Add group_changes function