moved multithreaded code into separate class ExecutorExtensions