added euclid distance