Achieving the Best Possible Outcomes in Legal Cases