refactor(main): use plain element object inside the eventListener