now I want to make it work when objects go multiple layers deep