expanding support for subqueries