Updated scrip & stochastic matrix check