Added some code to the sockets