pass $page variables around to handle paging