implemented circular paging