transform
query alg