     
     func updateImages(){
         if(!self.useImages || self.backgroundImageLoading == nil || self.backgroundImageCompleted == nil ){
-        self.loadingImage = self.getBarImage(self.backgroundLoadingColor,textColor:self.titleLoadingColor)
-        self.completedImage = self.getBarImage(self.backgroundCompletedColor,textColor:self.titleCompletedColor)
+            self.loadingImage = self.getBarImage(self.backgroundLoadingColor,textColor:self.titleLoadingColor)
+            self.completedImage = self.getBarImage(self.backgroundCompletedColor,textColor:self.titleCompletedColor)
         }
         else{
-            //println("im \(self.backgroundImageLoading.size) 2 \(self.backgroundImageLoading.size)")
-            self.loadingImage = self.getBarCustomImage(self.backgroundImageLoading!, textColor: titleLoadingColor) // self.backgroundImageLoading
+            self.loadingImage = self.getBarCustomImage(self.backgroundImageLoading!, textColor: titleLoadingColor)
             self.completedImage = self.getBarCustomImage(self.backgroundImageCompleted!, textColor: self.titleCompletedColor)
         }
     }

        UIGraphicsEndImageContext()
        return coloredImg
    }
    func getBarCustomImage(image:UIImage, textColor:UIColor)->UIImage{
        
        // Setup text parameters

            var croppedImage:CGImageRef = CGImageCreateWithImageInRect (im2.CGImage, newRect)
            UIImage(CGImage:croppedImage)!.drawInRect(CGRectMake(0,0,ceil(im1.size.width*percent),im1.size.height))
        }
        
        var newImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        
        return newImage
    }
    /*generating image with color background*/
    func getBarImage(color:UIColor, textColor:UIColor)->UIImage{
        
        // Setup text parameters
