added units to the spectrum class