Adding query support