add stop method for threads