Optical switching and n2 measurements in CS2