Improved speed with window operations