First version of QFGMA