made the indexing script generic