CCG algorithm complete