undoing multithread, requires much more changes to codebase than anticipated