move sub-query parsing logic to superclass, may be a partial fix (maybe) for #5