make Query reuseable

fixes #1545