add support for embedded documents