fork refactor