use dom.on method for event listener