use new style flag implementation