Refactor cc extraction to use the same method as to