threading is now working