new vector function