added vec_write