added distanceTo function to vectors