Method of deleting nodes added