variable name change `win' -> `window'