updated for multiple index files