refactor and update dot figure of state machine