resolve function fixed
normal resolution done. cnf split onto separate file