refactored the observer "update" function to be called "notify
made the segment an observer