Add vector function.