use self instead of window