repair and heil logic