Added first iteration of query supportt