made vectors array<double> types in some places, replaced int with size_t where necessary
parallelized prefix sum