Changed the comparison logic to reflect the change in threshold config