add evclid distance and min index