now LS works with matrices as rhs