completed state machine