add flash and permutation