working on the socket