made hierarchical indexing more flexible/optional