pass string flag to subquery
update the rest of the tests