refactoring Query->Statement