using indexing for faster retrieval