added static method for getting a vector from an array