update acts as state machine