Working on a method to verify and set query parameters for pagination