imported demo from tquery repo