added switched output diagram