Simplify query
Merge pull request #200 from timschofield/develop

Simplify query