refactor services, add paging