void UnMask(char *ifile1, char *ifile2, char *ifile3, int twofiles, FILE *f10)
{
        FILE *f1, *f2, *f3, *f4;
        FSM fsm1, fsm2;
	char varfname[MAX_LENGTH];

	if(!twofiles)
	{
		ifile1 = "../data/unmask.data";
		ifile2 = "../data/unmask.results";
		ifile3 = "../data/unmask.data_events";
	}
        else{ 
        /*second filename is default*/
        strcpy(varfname, ifile1);
        strcat(varfname, "_events");
        ifile3 = varfname;
        }

	f1 = fopen(ifile1, "r");
	f2 = fopen(ifile2, "w");
	f3 = fopen(ifile3, "r");

	fsm_read(f1, &fsm1);
	po_extract_events(f3); /*create mask list mmlistfiles.tmp*/
	f4 = fopen("mlist0.tmp", "r"); /*open temp file, first supervisor*/
	fsm_unmask(f4, &fsm1, &fsm2);
	fsm_print(f2, &fsm2);

	fclose(f1);
	fclose(f2);
	fclose(f3);
	fclose(f4);
	po_remove_event_temp_files();
	fsm_delete(&fsm1);
	fsm_delete(&fsm2);

}/*end UnMask*/


