add pagination and integration tests