Got rid of arrays like P[5] because now only P[0] is needed