improve lazy indexing