trying to improve performance. compacting elements into an array instead of pure hashes for pixels