almost have pageing working correctly