add the function to get group by gid
Merge remote-tracking branch 'origin/master'