Optical memories: controlling the beam