Make THRESHOLD a const