corrected previous commit, eigcg code is refined