add client code for paging