modified gimi_init