changed style of querying sub-docs