made vector2 a templated class