Adding the event listener to update the original element