add flag support