first stab at incorporating multithreading