added EXIT_TYPE for ex_funct