update for length