added minDiff field