tidied up the sparql a bit