function AddOwnership(string _btcAddress, string _signature, string _referCode) isActive public returns(ResultCode) {
        if (!checkValidBitcoinAddress(_btcAddress)) {
            LogCreateTrigger(0, 0, ResultCode.ERROR_PARAM);
            return ResultCode.ERROR_PARAM;            
        }
        
        if (!checkValidBase64(_signature)) {
            LogCreateTrigger(0, 0, ResultCode.ERROR_PARAM);
            return ResultCode.ERROR_PARAM;
        }
        
        bytes32 btcAddressHash = keccak256(_btcAddress);
        
        if (verifiedQueries[btcAddressHash] != 0) {
            LogCreateTrigger(btcAddressHash, 0, ResultCode.ERROR_EXIST);
            return ResultCode.ERROR_EXIST; 
        }

        if (oraclize_getPrice("URL") > this.balance) {
            LogCreateTrigger(btcAddressHash, 0, ResultCode.ERROR_NOT_ENOUGH_BALANCE);
            return ResultCode.ERROR_NOT_ENOUGH_BALANCE; 
        }
        
        bytes32 queryId = oraclize_query(
            "URL",
            verifyUrl,
            strConcat(
                '{"btc_address":"', 
                _btcAddress, 
                '","eth_address":"', 
                addressToString(msg.sender), 
                '","signature":"', 
                _signature, 
                '"}')
        );
        
        var info = queries[queryId];
        info.btcAddress = _btcAddress;
        info.myEther = msg.sender;
        info.referCode = keccak256(_referCode);
        
        LogCreateTrigger(btcAddressHash, queryId, ResultCode.SUCCESS);
        return ResultCode.SUCCESS;
    }