added reindexing functionality
added reindexing functionality