         self.localProducts = localProducts
         self.storeProducts = storeProducts
         self.purchasedProducts = purchasedProducts
-        super.init()
     }
     
-    public var numProducts:Int {
+    public var numProducts: Int {
         return localProducts.productsCount
     }
     
-    public func nameForProductAtIndex(_ index: Int) -> String {
+    public func localizedNameForProductAtIndex(_ index: Int) -> String {
         let productIdentifier = localProducts.identifierForProductAtIndex(index)
         if storeProducts.productsReceived, let name = storeProducts.localizedNameForProductWithIdentifier(productIdentifier) {
             return name

        }
    }
    
    public func descriptionForProductAtIndex(_ index: Int) -> String {
        let productIdentifier = localProducts.identifierForProductAtIndex(index)
        if storeProducts.productsReceived, let description = storeProducts.localizedDescriptionForProductWithIdentifier(productIdentifier) {
            return description

import Foundation


public enum ProductState {
    
    case retrieving
    
    case retrieved
    
    case purchased
}

public class ProductsDataSource {
    
    private let localProducts: LocalProductsProtocol
    private let storeProducts: StoreProductsProtocol
