add auto-redraw to filter function