added paging support