initial version of queries with correct xml