add a multithreaded class to enable applying a function over an iterator