gets the pages showing correctly