retrieve values in Hash#each to handle modified keys