Depth problem with function

I have a function that duplicates a specified mc x amount of times, running through a FOR loop to do so. This function is called more than once, so each time it runs through the FOR loop, depths get overlapped. Run it once, get something like “carn1, carn2, carn3” for mc names, on depths 1, 2, 3 respectively. Run it again, get something like “herb1, herb2, herb3” for mc names and again, depths 1, 2, 3. So only the herbs are shown…how can I give each duplicated mc a unique depth every time?

Here’s the function(s) if you want them.

// Function to generate one sprite type
populateWith = function(spriteType, max) {
 for(i=1; i<max+1; i++) {
  _root[spriteType].duplicateMovieClip(spriteType+i,i);
  mc = _root[spriteType+i];
  
  trace(mc);
 
  mc._x = Math.round(Math.random()*(395)+mc._width/2);
  mc._y = Math.round(Math.random()*(295)+mc._width/2);
 
  _global[spriteType+i].health = 100;
  
  mc.moveSprite(35);
  var time = Math.round(Math.random()*3000)+1600;
  this[spriteType+i+Int] = setInterval(mc, "moveSprite", time, "35");
 }
}
// Generate all sprites 
generateSprites = function() {
 populateWith("carn", Math.round(Math.random()*3)+1);
 populateWith("herb", Math.round(Math.random()*3)+1);
 populateWith("omni", Math.round(Math.random()*2)+1);
}