added support for legacy indexing