Added threshold calculations and the removal of values that fall below it.