more details in detail_ function, using some new tools from RcppParallel