function vestedAmount(ERC20 _token) public view returns (uint256) {
        uint256 currentBalance = _token.balanceOf(this);
        uint256 totalBalance = currentBalance.add(released[_token]);

        uint256 totalPhased = (start.add(duration).sub(cliff)).div(phased);
        uint256 everyPhasedReleaseAmount = totalBalance.div(totalPhased);

        if (block.timestamp < cliff.add(phased)) {
            return 0;
        } else if (block.timestamp >= start.add(duration) || revoked[_token]) {
            return totalBalance;
        } else {
            uint256 currentPhased = block.timestamp.sub(cliff).div(phased);
            return everyPhasedReleaseAmount.mul(currentPhased);
        }
    }