input and output edited to vectors