fixes #30: allow leading/trailing whitespace in queries

Fixes #30.