adding tQuery code, examples in progress