added rr:datatype support, refactored