added if condition around DoPurchase so we don't make empty purchases.