updated demo with nested cloning