Implemented buying and selling