private static PreprocessReturn preprocessComplete(ComXiriuzSemaXmlSchillerEDISchillerEDI comxiriuzsemaxmlschilleredischilleredi) throws JAXBException, IOException {
		DecodedLead[] leads = null;
		PreprocessReturn temp = new PreprocessReturn(comxiriuzsemaxmlschilleredischilleredi, leads, schillerSampRate);
		
	    ArrayList<int[]> leadData = new ArrayList<int[]>();	
	    ArrayList<String> leadNames = null;
		List<Wavedata> list =  comxiriuzsemaxmlschilleredischilleredi.getEventdata().getEvent().getWavedata();
		for (Wavedata wd : list) {
	    	if (wd.getType().equalsIgnoreCase("ecg_rhythms")){
		    	temp.setPrepSampleRate(wd.getResolution().getSamplerate().getValue());
		    	leadNames = new ArrayList<String>();
		    	List<Channel> channel = wd.getChannel();
		    	for (Channel subChannel : channel) {
		    		leadNames.add(subChannel.getName().toUpperCase());
		    		String channelData = subChannel.getData(); 	
			    	StringTokenizer tokenizer = new StringTokenizer(channelData, ",");
		    	    int n = tokenizer.countTokens();
		    	    int[] list1 = new int[n];
		    		for (int i = 0; i < n; i++) {
		    	    	String token = tokenizer.nextToken();
		    	    	list1[i] = Integer.parseInt(token);
		    	    }
	    	    	leadData.add(list1);
		    	}
	    	}
	    }
		temp.setDecodedLeads(DecodedLead.createFromLeadSet(leadData));
		temp.setLeadNames(leadNames);
		return temp;
	}