implemented some functions in vector3.c