refactor hgrc.