added functionality for the switch button in camera view