State Machine Update