initial work on flagging