function executeSubscription(
        address from, 
        address to, 
        address tokenAddress, 
        uint256 tokenAmount, 
        uint256 periodSeconds, 
        uint256 gasPrice, 
        uint256 nonce, 
        bytes signature 
    )
        public
        returns (bool success)
    {
        
        
        bytes32 subscriptionHash = getSubscriptionHash(
            from, to, tokenAddress, tokenAmount, periodSeconds, gasPrice, nonce
        );
        address signer = getSubscriptionSigner(subscriptionHash, signature);

        
        require(to != from, "Can not send to the from address");
        
        require(signer == from, "Invalid Signature");
        
        require(
            block.timestamp >= nextValidTimestamp[subscriptionHash],
            "Subscription is not ready"
        );

        
        
        require( requiredToAddress == address(0) || to == requiredToAddress );
        require( requiredTokenAddress == address(0) || tokenAddress == requiredTokenAddress );
        require( requiredTokenAmount == 0 || tokenAmount == requiredTokenAmount );
        require( requiredPeriodSeconds == 0 || periodSeconds == requiredPeriodSeconds );
        require( requiredGasPrice == 0 || gasPrice == requiredGasPrice );

        
        nextValidTimestamp[subscriptionHash] = block.timestamp.add(periodSeconds);

        
        if(nonce > extraNonce[from]){
          extraNonce[from] = nonce;
        }

        
        ERC20(tokenAddress).transferFrom(from,to,tokenAmount);
        require(
            checkSuccess(),
            "Subscription::executeSubscription TransferFrom failed"
        );

        emit ExecuteSubscription(
            from, to, tokenAddress, tokenAmount, periodSeconds, gasPrice, nonce
        );

        
        
        
        if (gasPrice > 0) {
            
            
            
            
            
            
            
            
            ERC20(tokenAddress).transferFrom(from, msg.sender, gasPrice);
            require(
                checkSuccess(),
                "Subscription::executeSubscription Failed to pay gas as from account"
            );
        }

        return true;
    }