refactor coordinator.