replaces the use of promises with events for data updating logic