function releaseVestedTokens(address _adr) public {
        VestingSchedule storage vestingSchedule = vestingMap[_adr];
        
        uint256 _totalTokens = safeAdd(vestingSchedule.principleLockAmount, vestingSchedule.bonusLockAmount);
        
        require(safeSub(_totalTokens, vestingSchedule.amountReleased) > 0);
        
        
        uint256 amountToRelease = 0;

        if (block.timestamp >= vestingSchedule.principleLockPeriod && !vestingSchedule.isPrincipleReleased) {
            amountToRelease = safeAdd(amountToRelease,vestingSchedule.principleLockAmount);
            vestingSchedule.amountReleased = safeAdd(vestingSchedule.amountReleased, amountToRelease);
            vestingSchedule.isPrincipleReleased = true;
        }
        if (block.timestamp >= vestingSchedule.bonusLockPeriod && !vestingSchedule.isBonusReleased) {
            amountToRelease = safeAdd(amountToRelease,vestingSchedule.bonusLockAmount);
            vestingSchedule.amountReleased = safeAdd(vestingSchedule.amountReleased, amountToRelease);
            vestingSchedule.isBonusReleased = true;
        }

        
        require(amountToRelease > 0);
        ERC20 token = ERC20(TokenAddress);
        token.transfer(_adr, amountToRelease);
        
        totalUnreleasedTokens = safeSub(totalUnreleasedTokens, amountToRelease);
        VestedTokensReleased(_adr, amountToRelease);
    }