added minDisj code