         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 {

        } else if cmd.containsString("(") {
            var components = cmd.componentsSeparatedByString("(")
            let methodName = components[0]
            if methods[methodName] != nil {
                components.removeFirst()
                var arg = components.joinWithSeparator("(")
                let range = arg.rangeOfString(")", options: .BackwardsSearch)

    func fileGetContents(stringLiteral: String) throws -> String? {
        let argument = try execIfNeeds(stringLiteral)!
        do {
            return try FileSaveHelper(fileName: argument, fileExtension: argument.containsString(".") ? .NONE : .PNG, subDirectory: dir).getData().base64EncodedStringWithOptions(.Encoding64CharacterLineLength)
        } catch {
            print("Couldn't get file content of \(argument)\(argument.containsString(".") ? "" : ".png"): \(error)")
            throw error
        }
    }
    
    func blackAndWhite(variable: String, stringLiteral: String) throws -> String? {
        let ciImage = CIImage(data: NSData(base64EncodedString: get(variable)!, options: NSDataBase64DecodingOptions.IgnoreUnknownCharacters)!)!
        let grayscale = ciImage.imageByApplyingFilter("CIColorControls", withInputParameters: [ kCIInputSaturationKey: 0.0 ])
        set(variable, value: UIImagePNGRepresentation(UIImage(CIImage: grayscale))!.base64EncodedStringWithOptions(.Encoding64CharacterLineLength))
        return nil
    }
    
    func getThemeID() -> String {
