add a thread monitor