function invest() public {

        
          
        uint _value = token.allowance(msg.sender, address(this));
        
          
        token.transferFrom(msg.sender, address(this), _value);
        
          
        token.transfer(owner, _value.div(13));

        
          
        if (deposit[msg.sender] > 0) {
            
            
              
              
            uint amountToWithdraw = (block.timestamp.sub(lastTimeWithdraw[msg.sender]).sub((block.timestamp.sub(lastTimeWithdraw[msg.sender])).mod(1 days))).mul(deposit[msg.sender].div(30)).div(1 days);
            
              
            if (amountToWithdraw != 0) {
                
                  
                withdrawn[msg.sender] = withdrawn[msg.sender].add(amountToWithdraw);
                
                  
                token.transfer(msg.sender, amountToWithdraw);
            }
            
              
            lastTimeWithdraw[msg.sender] = block.timestamp;
            
              
            deposit[msg.sender] = deposit[msg.sender].add(_value);
            
              
            return;
        }
        
        
          
          
        lastTimeWithdraw[msg.sender] = block.timestamp;
        
        
        deposit[msg.sender] = (_value);
    }