code for RDF->R, not tested yet