killing the thread