remove multithreading of task and better task order