added a state-machine, vending, problem