use filter length not data length in modulo