Added nextIndex method to sparql_quick.rb