missing functionality for stopping thread