unit vector

fixed unit vector code