new nnf module rewritten