changing arrays to vectors