update length