modified TaggedIndex and fixed minor bug in Approach1.py