         selectRow(selectedYear!, inComponent: 2, animated: false)
     }
     
-    private func getNumberOfComponentsForDatePickerType(type : VJDatePickerType?)->Int{
+    private func getNumberOfComponentsForDatePickerType(var type : VJDatePickerType?)->Int{
         
-        var pickerType : VJDatePickerType = .Default
-        if let _ = type{
-            pickerType = type!
+        if type == nil{
+            type = .Default
         }
-        switch pickerType{
+        switch type!{
         case .Default:
             return 3
         case .MonthDay,.YearMonth:

        }
        return yearArray
    }
   
    convenience init(type: VJDatePickerType, minYear : Int, maxYear : Int){
        self.init()
        minimumYearValue = minYear

            datePickerType = .Default
        }
        showsSelectionIndicator = true
        prepareRowsForVJDatePickerType(datePickerType)
        selectInitialValuesForDatePickerType(datePickerType)
    }
    
