some code to find weakly compatible splits