modified depth to be a function of number of cells left for smoother animations.