need to remove nodes properly