add template filter hook