added pagination controls