Add initializer to add the observer to event