adding a reindex method that accepts a string type name
fixing assertion