Initialized threshold in constructor