fixed issue 13 - subqueries need proper bracketing