changed index type to tree if factory makes tree index