Added Multithreading

But it doesn't quite work the way I want.