renamed matrix solving method, added code to sum a row