add patch for weight enumerator