fixed Singleton class to be thread safe, now returns only reference