Improve the method for constructing vector.