         } else {
             allMatches = addToSearch(allMatches, newIngredient: currentSearch.last!)
             while !(isMatchDataLoaded()) {}
-            allMatches = sortByRank(allMatches)
             matches = allMatches
             tableView.reloadData()
         }

    let ICON_FONT = UIFont.fontAwesomeOfSize(100)

    // CLASS VARIABLES
    var matches = [(ingredient: PFIngredient, rank: Int)]() // data for the table
    var allMatches = [(ingredient: PFIngredient, rank: Int)]()
    var maxMatchRank : Double = -1 // used to determine match color level
    
    var filters: [String: Bool] = [F_KOSHER: false,
        F_DAIRY: false,

        
        if !(matches.isEmpty) {
            let match = matches[indexPath.row].ingredient
            let matchRank = matches[indexPath.row].rank // not in use for now
            let matchesPerLevel = Int(matches.count / MATCH_COLORS.count)
            let matchLevel = Int((matches.count - indexPath.row)/matchesPerLevel)

            if match.isDataAvailable() {
                cell.label.text = match[_s_name] as? String
            } else {
