remove legacy code from filter