working with arrays and hashes