refactor filter and ask liucheng for help