removing inutil nodes