factor socket creation