Sparql improovement in legacy and second version