deep queries correctly validated
debug tweak
implemented subqueries