modified two cals example