index generation perfected