moved some stuff up to cnf