implemented switching views