modified pagination