more dynamic treatment of hash