added window eventListener