add support for state diagrams