added rudimentary paging controls