more gui stuff with queries & subqueries