refactored rdf.php