modified logic of lowest compensation