wasn't using def threshold