Add isFlagged to core data