wrote Vec2Function