added multithreaded dispatcher