finished up the impl of GomatReplacer