made averagePixel into sick one-liner \\m/