This method on it's own returns too many maximas, and it makes sense to eliminate false positives here itself. And set optimal value of `thresh` depends on the context in which it is used