updated queries for M7 and hbase