refactor cd