refactor filtering
refactor filtering