refactored VectorDistance to MyVector