Use thread pool for better performance