add the flags support