added ability to specify index options.