improvements on query class
fixed #14
fixed #15
Merge pull request #18 from christianklauenboesch/iss15

improvements on query class