support old and new indices format