added getgroups api functionality