Added ajax flagging