vector distance method