structurized code, sample filter applied