Move lsmr call to member function