externalize indexing cuntions