Made more generic (works with rdf's now)