dry up code with 'before' filter