update this to window, closes #1144