Added parallelization to main.c