adding statechart