rewriting vectorization outside of mapreduce