threading now properly works for everything