update filt and cut code