tquery stuff

first steps.