playing with r.cpp