the parallel version works correctly