Create separate class with threadpools