function allocate() public notLocked notAllocated onlyOwner {

        
        require(token.balanceOf(address(this)) == totalAllocation, "Token should not be allocated yet.");

        allocations[opentokenAddress] = opentokenAllocation;
        allocations[tokenmanAddress] = tokenmanAllocation;
        allocations[marketingAddress] = marketingAllocation;
        allocations[teamReserveWallet] = teamReserveAllocation;
        allocations[communityReserveWallet] = communityReserveAllocation;

        emit Allocated(opentokenAddress, opentokenAllocation);
        emit Allocated(tokenmanAddress, tokenmanAllocation);
        emit Allocated(marketingAddress, marketingAllocation);
        emit Allocated(teamReserveWallet, teamReserveAllocation);
        emit Allocated(communityReserveWallet, communityReserveAllocation);

        address cur;
        uint arrayLength;
        uint i;
        arrayLength = unLockedInvestorsIndices.length;
        for (i = 0; i < arrayLength; i++) {
            cur = unLockedInvestorsIndices[i];
            allocations[cur] = unLockedInvestors[cur];
            emit Allocated(cur, unLockedInvestors[cur]);
        }
        arrayLength = lockedInvestorsIndices.length;
        for (i = 0; i < arrayLength; i++) {
            cur = lockedInvestorsIndices[i];
            allocations[cur] = lockedInvestors[cur];
            emit Allocated(cur, lockedInvestors[cur]);
        }

        
        preDistribute();
    }