implemented `each` for hashes