some minor updates and added parallelism.