index auto-generate sort of works