refactor goping