change how socket is created