automatic iim detection