added replace_add_fgfg which which TR10_inv is fast and powerful