updated length and depth