Adding functionality to list all the groups with pagination parameter