         self.presentViewController(alert, animated: true, completion: nil)
     }
     
+    func simulateWeatherToday() {
+        let index = Int(arc4random_uniform((UInt32(weatherArray.count))))
+        
+        weatherToday = weatherArray[index]
+    }
+    
+    func findAverage(data:[Int]) -> Int {
+        var sum = 0
+        
+        for x in data {
+            sum += x
+        }
+        
+        var average: Double = Double(sum) / Double(data.count)
+        var rounded: Int = Int(ceil(average))
+        
+        return rounded
+    }
+    
 }
 

                println("no match, no revenue")
            }
        }
    }
    
    func updateMainView() {

    var lemonsToMix = 0
    var iceCubesToMix = 0
    
    var weatherArray: [[Int]] = [[-10, -8, -5, -7], [5, 8, 10, 9], [22, 25, 27, 23]]
    
    var weatherToday: [Int] = [0, 0, 0, 0]
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        simulateWeatherToday()
        
        updateMainView()
    }
