added some features in index_extend