re-added event listener code that had been removed