now builds the index