moved the socket to its own module