working parallization with openmp and help from matteo