made a functional vector2D class