Working serial version+started the parallelization