used nested array and hashes