Generalize Threshold filtering and filter early