paging almost working....if statements are broken though?