updated script for indexing typology