renderController to switch views