First page condition checking refactored into pagination
added test for first page
renamed method