change ppm implementation to use a 1d array instead of 2d