Use change method for has_key to key
Fix hash declaration error.
change hash location.
Fixing hash storage.