making necessary changes to make build_indices.py working