transform a vector