replicate a Function in parSapply with replicate()