move initParallel out