adapted query example for CGA-TSIG and fixed bugs