Add param to set thread count