writing vector