adds socket on connect