LGS solver