first version of a solver for a system of linear equations