use imp_mod_handle as global identification, it is more transparent then mixing im_idx and imp_mod_handle types.