Added a function to vector.