added 4 threading autotuning process to speed up the overall process