pagination now working