this class could be changed to be a singleton.