autodetect() functional