doFilter approach - now in the util.js