Implemented the functionality of the simple threshould finder.