updated with parLapply