         let results = realm.objects(RealmLgtm).filter {e in true} as [RealmLgtm]
         let urls = results.map{$0.url}
         let targetUrls:[String]
-        if urls.count > stackLimit {
-            targetUrls = [] + urls[0...(stackLimit - 1)]
+        if urls.count > StackLimit {
+            targetUrls = [] + urls[0...(StackLimit - 1)]
         } else {
             targetUrls = urls
         }

            fetchImage(url) { [unowned self] image in
                let lgtm = Lgtm(url: url, image:image)
                self.favStack.enqueue(lgtm)
                if self.favStack.count >= self.stackLimit {
                    self.fetchingRealm = false
                }
            }

    private var fetching = false
    private var fetchingRealm = false
    private static let sharedInstance:Provider = Provider()
    private let StackLimit = 20
    private var stack:Queue<Lgtm> = []
    private var favStack:Queue<Lgtm> = []
    private let HistoryLimit = 200
    private var history:Queue<String> = []
}
/// static method interfaces
