started with state machine