A molecular outflow driven by an optical jet