refined eigcg code