removing parent and child nodes