Added proper pagination