switched query direction