undo hardcoding of threshold