solve system of linear equations