Wrote hashCode() for event classes