2012-hw2task2: first multithreaded version