moved unflagged to its own method