improved sparql for the umpteenth time