     func animateProgressRun(progressIndex progressIndex: Int, withInterval interval: NSTimeInterval) {
         for progress in 1...100 {
             NSThread.sleepForTimeInterval(interval)
-//                dispatch_group_notify(myGroup, myQueue, {})
             if progress == 50 {
                 dispatch_group_wait(myGroup, 2)
             }


    func resetProgressBars() {
        progressBarsLeftArray.removeAll()
//        progressBarsLeft = progressBars.count

        for progressBar in progressBars {
            progressBarsLeftArray.append(-1)


    @IBOutlet var progressBars: [UIProgressView]!
    var progressBarsLeftArray = [Int]()
    var randomProgressBarIndex: Int {
        NSThread.sleepForTimeInterval(0.003)
        let randomProgressBarIndex = random() % 4
        var found = false
        dispatch_sync(myQueue) {
