cleaned out old transformation of sequence of flags and applied the new
transformation of a sequence of flags