added required support for queries. closes #9

Opened PR for feedback