finished (i think) paging routines