added pagination parameters to getUsers function