Refactoring to new hash