thread not workling