generalize the reindexing of the condition