calculation of bar vector added