Adding filter hook