sell.cpp and buy.cpp work