implement the model part of the flagging