stylistic changes to clarify handling the hashes containing duplicate items