Dynamic window size. Improved kernel