add paging and searching