added query function to abstract facade