add support for different threads num