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

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

            
            uint256 rounded = notRounded.div(granularity).mul(granularity);

            return rounded;
        }
    }