refactor hashify splitting into smaller functions