adapting the InterPrologQuery class to use the new QuerySolution class