new: non omp iterative algorithm from scratch, seems 100% working