initial code for the socket