fixed compiler warnings. improving parallelization