enabled threshold checking and tweaked output