re-implemented class as a singleton