changed array of arrays to array of hashes