Add state machine like diagram