added getGroupsArray() method