Custom filter function example