make the index-maker slightly more reusable