added statechart diagram