a parallel version with complete mapping