merging with rdf handler code