Working version without Singleton