         properties["image.icon"] = null
         properties["image.wicon"] = null
         properties["image.cursor"] = null
-        // MARK: methods
-        methods["print"] = printString
-        methods["fileGetContents"] = fileGetContents
+        // MARK: functions & methods
+        functions["print"] = printString
+        functions["fileGetContents"] = fileGetContents
+        methods["blackAndWhite"] = blackAndWhite
         // MARK: parse
         var commands: [(Int, String)] = []
         for line in 0..<lines.count {

    
    let dir: String
    
    var methods: [String: ((String) throws -> String?)] = [:]
    var properties: [String: String?] = [:]
    var constants: [String: String?] = [:]
    
    init(dir: String, code: String) throws {
        self.dir = dir
        let lines = code.componentsSeparatedByString("\n")
        // MARK: default properties
        constants["_PLATFORM"] = "iOS"
        constants["_PLATFORM_VERSION"] = UIDevice.currentDevice().systemVersion
        constants["_BREAKBALOON_VERSION"] = "1.0.0"
        properties["theme.id"] = null

                    throw ExecErrors.SyntaxError
                }
                arg.removeRange(range!.startIndex..<arg.endIndex)
                return try functions[methodName]!(arg)
            }
            let lastDot = methodName.rangeOfString(".", options: .BackwardsSearch)!.startIndex
            if methods[methodName[lastDot.successor()..<methodName.endIndex]] != nil && valueExists(methodName[methodName.startIndex..<lastDot]) {
                components.removeFirst()
                var arg = components.joinWithSeparator("(")
                let range = arg.rangeOfString(")", options: .BackwardsSearch)
                if range == nil {
                    print("Missing closing bracket ')'")
                    throw ExecErrors.SyntaxError
                }
                arg.removeRange(range!.startIndex..<arg.endIndex)
                return try methods[methodName[lastDot.successor()..<methodName.endIndex]]!(methodName[methodName.startIndex..<lastDot], arg)
            }
        }
        return null
    }
    
    func valueExists(name: String) -> Bool {
        return constants[name] != nil || properties[name] != nil
    }
    
    func set(name: String, value: String) {
        if constants[name] != nil {
            constants[name] = value
        } else if properties[name] != nil {
            properties[name] = value
        }
    }
    
    func get(name: String) -> String? {
        if constants[name] != nil {
            return constants[name]!
        } else if properties[name] != nil {
            return properties[name]!
        }
        return nil
    }
    
    func value(vals: [String]) throws -> String? {
