modify buy/sell logic