edited the state diagrams