changed MPI_Scatter to MPI_Scatterv
frees removed, removed decommented code for better readability