add threadstopping capabilities