Parallel version working with mutex protection