before adding state machine