Updated to use sparql