refactored to use NSNotificationCenter