refactor gcof