added required support for queries

Opened PR for feedback
Trailing whitespace detected.