adding event for changes