use for instead of forEach when iterating key associations