added code to parse loo result, fixed minor bug in run_loo