move api call to service, add paging