index the ref file