added custom parser capability

it's tricky to separate general query logic from parsing logic but works
with examples in tests

fixes #3