adding with threshold