Adding difference logic.