Put in the function to change the pages.