update  iou logic