Playing around with statemachines