partial implementation of G6