Moved declaration of hash into context