threshold trick for the method k