added 1st version of the socket implementation