dcnf and alg2

fixed errors in dcnf and the joiner function of alg2