refactor url and paging