Reduce number of arrays created