changing to sockets