add key threshold to prefs