added functionality to vector class