added omp parallelization (commented out some parts for performance
measure)