added buy and sell functionality