cleaning up cg so doctests pass