 
             // Integer Enum
             else if let enumType = property.type as? SuperEnum.Type {
-                if let rawValue = value as? NSNumber {
-                    super.setValue(rawValue, forKey: key)
-                } else if let string = value as? String, rawValue = self.dynamicType.numberFromString(string) {
-                    super.setValue(rawValue, forKey: key)
-                }
+                super.setValue(self.dynamicType.numberFromValue(value), forKey: key)
             }
 
             // What else?

        static let dateFormatter = NSDateFormatter()
    }

    public class func numberFromString(string: String) -> Number? {
        let formatter = Shared.numberFormatter
        if formatter.numberStyle != .DecimalStyle {
            formatter.numberStyle = .DecimalStyle
        }
        return formatter.numberFromString(string)
    }

    public static let defaultDateFormatter: NSDateFormatter = Shared.dateFormatter

}

    }

    public override func setValue(value: AnyObject?, forKey key: String) {
        if let property = self.properties.filter({ $0.name == key }).first {
            let type = property.type

            // if model doesn't have setter method for key
            if !self.respondsToSelector(Selector(self.dynamicType.propertySetterNameForKey(key))) {

                // if model doesn't have ivar - it's undefined key
                let ivar = class_getInstanceVariable(self.dynamicType, key)
                if ivar.hashValue == 0 {
                    return self.setValue(value, forUndefinedKey: key)
                }

                // memory address for ivar
                let address = ObjectIdentifier(self).uintValue + UInt(ivar_getOffset(ivar))

                if type == Int.self || type == Optional<Int>.self {
                    let pointer = UnsafeMutablePointer<Int?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.integerValue
                    return
                }

                if type == Int8.self || type == Optional<Int8>.self {
                    let pointer = UnsafeMutablePointer<Int8?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.charValue
                    return
                }

                if type == Int16.self || type == Optional<Int16>.self {
                    let pointer = UnsafeMutablePointer<Int16?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.shortValue
                    return
                }

                if type == Int32.self || type == Optional<Int32>.self {
                    let pointer = UnsafeMutablePointer<Int32?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.intValue
                    return
                }

                if type == Int64.self || type == Optional<Int64>.self {
                    let pointer = UnsafeMutablePointer<Int64?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.longLongValue
                    return
                }

                if type == UInt.self || type == Optional<UInt>.self {
                    let pointer = UnsafeMutablePointer<UInt?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.unsignedLongValue
                    return
                }

                if type == UInt8.self || type == Optional<UInt8>.self {
                    let pointer = UnsafeMutablePointer<UInt8?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.unsignedCharValue
                    return
                }

                if type == UInt16.self || type == Optional<UInt16>.self {
                    let pointer = UnsafeMutablePointer<UInt16?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.unsignedShortValue
                    return
                }
                
                if type == UInt32.self || type == Optional<UInt32>.self {
                    let pointer = UnsafeMutablePointer<UInt32?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.unsignedIntValue
                    return
                }
                
                if type == UInt64.self || type == Optional<UInt64>.self {
                    let pointer = UnsafeMutablePointer<UInt64?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.unsignedLongLongValue
                    return
                }

                if type == Float.self || type == Optional<Float>.self {
                    let pointer = UnsafeMutablePointer<Float?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.floatValue
                    return
                }

                if type == Double.self || type == Optional<Double>.self {
                    let pointer = UnsafeMutablePointer<Double?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.doubleValue
                    return
                }

                if type == CGFloat.self || type == Optional<CGFloat>.self {
                    let pointer = UnsafeMutablePointer<CGFloat?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value) as? CGFloat
                    return
                }

                if type == Bool.self || type == Optional<Bool>.self {
                    let pointer = UnsafeMutablePointer<Bool?>(bitPattern: address)
                    pointer.memory = self.dynamicType.numberFromValue(value)?.boolValue
                    return
                }
            }

            // String
            if type == String.self || type == Optional<String>.self {
