Minor code simplification for fliter sample