code refactor cd