modified eventListener on my first javascript sample template