working to simplify this class.