parameterizing window length