chatfilter rewrite