solution for hash exercise 8