take out extra line of code for pagination