add changes to inferGlySubstr.m