remove 0 degree nodes