Properly updating hash.
Revised example displaying logic.