Added messaging to the statemachine