parse entities used as queries

fixes #4