added support for objects with parents