Remove debug and set real threshold