adjusted index to read directories