Restructure data, add filter length limit