Finished smart, with omp and tbb