replaced *index with *libindex so gcc is happy