add flag (write to db)