modified indexmanager.java