     var split_rate: Float // rate at which random splits happen
     var num_steps: Float  // how many steps have happened
     var num_splits: Float // how many splits have happened
-    
-    static var s: AntSettings = AntSettings()
-    
-    init(x: Int, y: Int, dx: Int, dy: Int, time: Float) {
+    var s: AntSettings! = nil
+    
+    init(x: Int, y: Int, dx: Int, dy: Int, time: Float, s: AntSettings) {
         self.x = x
         self.y = y
         self.dx = dx
         self.dy = dy
+        self.s = s
         split_t = time
-        split_dt = Ant.s.split_dt_start
-        split_rate = Ant.s.split_rate_start
+        split_dt = s.split_dt_start
+        split_rate = s.split_rate_start
         num_steps = 0
         num_splits = 0
     }

    var texLoc: GLint = 0
    var imageIndex: Int = 0
    
    var settings: AntSettings = AntSettings()
    var variances: AntVariances = AntVariances()
    var pixels: [PixelData]! = nil
    var ants: [Ant] = [Ant]()
    
    var simulationFinished: Bool = false
    var simulationFinishedTime: NSDate! = nil
    var time: Float = 0.0
    
    @IBOutlet weak var configPanel: NSPanel! = nil

            }
            time += 1.0
            // check if simulation is finished
            if (ants.count == 0 && !finished) {
                time = 0.0
                finished = true
                finishedTime = NSDate()
                outputPng(imageIndex % 10)
                imageIndex += 1
            }
            // check if finished and end pause time over
            if (ants.count == 0 && finished) {
                let time_since_end = -finishedTime.timeIntervalSinceNow
                if (time_since_end > Double(rand_settings.end_pause_time)) {
                    // reset simulation
                    time = 0.0
                    let w = rand_settings.w
                    let h = rand_settings.h
                    for i in 0..<(w*h) {
                        pixels[i] = rand_settings.bg_color
                    }
                    randomizeAntSettings()
                    ants.append(Ant(x: w / 2,
                                    y: h / 2,
                                    dx:  0,
                                    dy: -1,
                                    time: time,
                                    s: rand_settings))
                    finished = false
                    break;
                }
            }
