solution for hash exercise 6