Much better logic in vending_machine_cpu