adding thread number to stop method