vector implemented and updateVec() function to be used for balancing