A sample event driven state machine using Stateless