working paging, but not in all pages are screwed