rewrote c++ in riffle.