initial commit copying vector function