Sn should now be writting the full and correct matrix as well as the equations for boundary conditions