added reindexing option for active record