updated with eventListeners