adding paging mechanism