Refactored queries