added query support