handle addition & update of groups