build_index change to index lib