changed socket to connect to localhost