writeVector/readVector updated