better event intersection function