refeactoring cd