add functional view toggle logic