Refactor CP