a little less duplication for queries.
Merge pull request #11 from davekaro/master

keeping duplication down