Add updateGroups functionality to add button