added theshold value