Added indexreader code