Update mealy machine functions