move threshold to config.json