added paging (sort of)