Added a switch statement for the page which displays the right page