fixed bugs and added a time threshold config attribute