how to calculate the intersection of two events