changed getGroups api