fixed local threshold test