Found working threshold method.