add get groups method