Added purchase method to vending machine