added method doBuy