code for a paper in CAGEO