added the basic view switching