added pagination feature