deleteing duplicated nodes