Implemented the Threshold method.