scattering matrix method