package indexing code