function TakeProfit(uint offset, uint limit) external {
    require (limit <= tokens.length);
    require (offset < limit);

    uint N = (block.timestamp - start) / period;
    
    require (N > 0);
    
    for (uint k = offset; k < limit; k++) {
      if(dividends[N][tokens[k]] == 0 ) {
          uint amount = DEX.balanceOf(tokens[k], address(this));
          if (k == 0) {
            DEX.withdraw(amount);
            dividends[N][tokens[k]] = amount;
          } else {
            DEX.withdrawToken(tokens[k], amount);
            dividends[N][tokens[k]] = amount;
          }
      }
    }
  }