Iterating through a hash