refactoring guoid