vendingmachine implementation