modify api such that the linear solver is constructed automatically . i think this makes things simpler