implement the AddToGroups command