some changes in threads
some changes part 2