refactoring with hashes