function getVested(address _beneficiary) public returns (uint256) {
        require(balances[_beneficiary]>0);
        if (_beneficiary == owner){

            vested[owner] = balances[owner];
            total_vested[owner] = balances[owner];

        } else if (block.timestamp < start) {

            vested[_beneficiary] = 0;
            total_vested[_beneficiary] = 0;

        } else if (block.timestamp >= start.add(duration)) {

            total_vested[_beneficiary] = balances[_beneficiary];
            vested[_beneficiary] = balances[_beneficiary];

        } else {

            uint vested_now = balances[_beneficiary].mul(block.timestamp.sub(start)).div(duration);
            if(total_vested[_beneficiary]==0){
                total_vested[_beneficiary] = vested_now;

            }
            if(vested_now > total_vested[_beneficiary]){
                vested[_beneficiary] = vested[_beneficiary].add(vested_now.sub(total_vested[_beneficiary]));
                total_vested[_beneficiary] = vested_now;
            }
        }
        return vested[_beneficiary];
    }