add Singleton pattern with unit tests