add paging feature to API