update and add tests for paging with unique