public int compare(Event arg0, Event arg1) {
			// the comparison is twofold: first, we sort based on the time when the event fires
			// if the time is equal for two events, the event that was created earlier is defined
			// to be smaller. (This approach guarantees a consistent ordering). 
			if(arg0.time == arg1.time){
				if(arg0.id > arg1.id){
					return 1;
				}
				else if(arg0.id < arg1.id){
					return -1;
				}
				else{
					return 0;
				}
			}
			else if(arg0.time - arg1.time < 0){
				return -1;
			}
			else{
				return 1;
			}
		}