solution for hash exercise 7