remove the unwanted nodes from the table instead of skipping them