singleton and observer pattern