placed the paginateMe script on page to separate js file