updated threading
updated threading