improve pagination and document URLs
handle search