checking if the same handlers for events exists. The observer pattern must be improve