colors network, function for deleting hanging nodes