added option for setting a local window size for sorting.