pre select only the good events, use better logic