make window changable for event listeners