added new logic
added reindex