rewrote ad-hoc test with sparql statements to improve speed