Index: trunk/src/scriptbuilder/structures/TimeSlice.java
===================================================================
--- trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 162)
+++ trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 167)
@@ -320,18 +320,15 @@
         }
     }
+    //these two following functions should not be necessary.
     /**
      * this method removes an audioevent that corresponds to the input I_AudioEvent. NEEDS VERIFICATION
      */
     public void removeCorrespondingAudioEvent(I_AudioEvent comparisonEvent){
-        String id = comparisonEvent.getFileName().split("/")[1];
+        String id = comparisonEvent.getID();
         for(I_ScriptEvent event : events)
         {
             if(event instanceof AudioEvent)
             {
-                System.out.println("removed an audioevent \n" + ((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4));
-                System.out.println(id);
-                System.out.println(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4)));
-
-                if(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4)))
+                if(id.equals(((AudioEvent) event).id))
                 {
                     System.out.println("the event was deleted");
@@ -342,11 +339,11 @@
         }
     }
-    public AudioEvent getCorrespondingAudioEvent(I_AudioEvent compariosonEvent)
-    {
-        String id = compariosonEvent.getFileName();
+    public AudioEvent getCorrespondingAudioEvent(I_AudioEvent comparisonEvent)
+    {
+        String id = comparisonEvent.getID();
         AudioEvent retVal = null;
         for(I_ScriptEvent event: events)
         {
-            if(event instanceof AudioEvent && ((AudioEvent)event).audioPath.split("/")[2].equals(id))
+            if(event instanceof AudioEvent && id.equals(((AudioEvent) event).id))
             {
                 retVal = (AudioEvent) event;
