Add a query-first function
Merge pull request #10 from alejandrogomez/master

Add a query-first function