added required support for queries

Opened PR for feedback
Perceived complexity for validate_queries is too high. [9/7]