add modified thread managment for guiding