modified pagination exercise