Committing the patch provided by Lahiru (Frequent window & Lossy Frequent window)