refactor common hashes