refactored ts_induce into a new package to transform pairs of flags