added support for grandchildren