Mealy funcionality