Modified wvidal with autodetect