     var objects = [Translation]()
     var filteredObjects = [Translation]()
     var eoWords: NSString = ""
+    var enWords: NSString = ""
     var dictEoEn = [String: String]()
+    var dictEnEo = [String: [String]]()
 
     func readFile(file: String, ofType type: String = "txt") -> String {
         let path = NSBundle.mainBundle().pathForResource(file, ofType: type)

    }

    func readWordList() {
        var eoWordsArr = [String]()
        for line in readFile("espdic").componentsSeparatedByString("\n") {
            let words = line.componentsSeparatedByString(":")
            if words.count > 1 {
                let eo = words[0].trim()
                let en = words[1].trim()
                dictEoEn[eo] = en
                eoWordsArr.append(eo)
                objects.append(Translation(eo: eo, en: en))
            }
        }
        eoWords = eoWordsArr.joinWithSeparator("\n")
    }

    func searchEo(searchText: String) -> [Translation] {
        let regex: NSRegularExpression
        do {
            regex = try NSRegularExpression(pattern: searchText, options: [.CaseInsensitive, .AnchorsMatchLines])
        } catch {
            return []
        }
        var filtered = [Translation]()
        var range = NSMakeRange(0, 0)
        let matches = regex.matchesInString(eoWords as String, options: [], range: NSMakeRange(0, eoWords.length))
        for match in matches {
            if match.range.location > NSMaxRange(range) {
                range = eoWords.lineRangeForRange(match.range)
                let eo = eoWords.substringWithRange(range).trim()
                if let en = dictEoEn[eo] {
                    filtered.append(Translation(eo: eo, en: en))
                }
            }
        }

        } else if scope == "Esperanto" {
            filteredObjects = searchEo(searchText)
        } else {
            filteredObjects = searchEn(searchText)
        }
        tableView.reloadData()
    }
