restyled everything; wrote multithreaded test cases