global threshold method implemented