self.paymentData.bountyOwed = self.paymentData.getBountyWithModifier(self.claimData.paymentModifier)
                .add(self.paymentData.bountyOwed);
        } else {
            
            self.paymentData.bountyOwed = self.paymentData.getBounty().add(self.paymentData.bountyOwed);
        }

        
        uint measuredGasConsumption = startGas.sub(gasleft()).add(EXECUTE_EXTRA_GAS);

        
        
        

        
        self.paymentData.bountyOwed = measuredGasConsumption
            .mul(self.txnData.gasPrice)
            .add(self.paymentData.bountyOwed);

        
        
        emit Executed(self.paymentData.bountyOwed, totalFeePayment, measuredGasConsumption);
    
        
        self.paymentData.sendBounty();

        
        _sendOwnerEther(self, self.meta.owner);

        
        
        
        
        return true;
    }


    
    
    
    uint public constant PRE_EXECUTION_GAS = 25000;   
    
    
    uint public constant EXECUTION_GAS_OVERHEAD = 180000; 
    
    uint public constant  EXECUTE_EXTRA_GAS = 90000; 

    
    uint public constant CANCEL_EXTRA_GAS = 85000; 

    function getEXECUTION_GAS_OVERHEAD()
        public pure returns (uint)
    {
        return EXECUTION_GAS_OVERHEAD;
    }
    
    function requiredExecutionGas(Request storage self) 
        public view returns (uint requiredGas)
    {
        requiredGas = self.txnData.callGas.add(EXECUTION_GAS_OVERHEAD);
    }

    
    function isCancellable(Request storage self) 
        public view returns (bool)
    {
        if (self.meta.isCancelled) {
            
            return false;
        } else if (!self.meta.wasCalled && self.schedule.isAfterWindow()) {
            
            return true;
        } else if (!self.claimData.isClaimed() && self.schedule.isBeforeFreeze() && msg.sender == self.meta.owner) {
            
            return true;
        } else {
            
            return false;
        }
    }

    
    function cancel(Request storage self) 
        public returns (bool)
    {
        uint startGas = gasleft();
        uint rewardPayment;
        uint measuredGasConsumption;

        
        require(isCancellable(self));

        
        self.meta.isCancelled = true;

        
        require(self.claimData.refundDeposit());

        
        
        
        
        if (msg.sender != self.meta.owner) {
            
            address rewardBenefactor = msg.sender;
            
            
            uint rewardOwed = self.paymentData.bountyOwed
                .add(self.paymentData.bounty.div(100));

            
            measuredGasConsumption = startGas
                .sub(gasleft())
                .add(CANCEL_EXTRA_GAS);
            
            rewardOwed = measuredGasConsumption
                .mul(tx.gasprice)
                .add(rewardOwed);

            
            rewardPayment = rewardOwed;

            
            if (rewardOwed > 0) {
                self.paymentData.bountyOwed = 0;
                rewardBenefactor.transfer(rewardOwed);
            }