major changes, including more tests, support multithreading and more