test vectorization
fixed missing end, moved nargout tests