generating the window based on size threshold instead of heuristics
Added results with new approach