first cut at enabling key-based indexing