add query to tornado
Merge branch 'master' into tornado