support format switch with multi elems