CGO Algorithm