missed refactored query