References #122, added padination.

Created own methog to query groups that allows using pagination.