added function for computing vector from one vector to another