added get_sparql_query function