add logic to eliminate degenerate splits