tested and changed query support