Use objective not distance
Use objective not distance and compute weighted mean
Fix test cases