An ultrahigh vacuum electron spectrometer for surface studies