solution for hashes exercise 3