- In the process of converting to state diagram, not working yet.