Update statechart.js

addded same readability