added buy/sell function