contract TokenCrowdsale is Crowdsale, Ownable {
    using SafeMath for uint256;

    address payable private _ownerWallet;

    constructor(uint256 rate, address payable wallet, IERC20 token) Crowdsale(rate, wallet, token) public {
        _ownerWallet = wallet;
    }

    function wallet() public view returns (address payable) {
        return _ownerWallet;
    }

    function _forwardFunds() internal {
        _ownerWallet.transfer(msg.value);
    }

    function changeWallet(address payable newWallet) public onlyOwner {
        _ownerWallet = newWallet;
    }

    // Changes the conversion between wei and token unit (decimals < 18).
    // The rate defines how many wei a buyer pays for the smallest and indivisible token unit.
    function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
        return weiAmount.div(rate());
    }

    // Validates if weiAmount is enough to buy 1 token unit.
    function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
        super._preValidatePurchase(beneficiary, weiAmount);
        require(weiAmount >= rate());
        this;
    }
}
function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
    return weiAmount.div(rate());
}

// Changes the conversion between wei and token unit (decimals < 18).
// The rate defines how many wei a buyer pays for the smallest and indivisible token unit.