Singleton working with reference