Added pattern matching with vectors.