Some query modification (work in progress)