change virtuoso api code in oder to make less requests on the triplestore