Added code to handle buying and selling items over the network