Updated to support paging.