more Gigi algo improvements.