Enhance buy and sell method (Debug the quantity updating