reduce size of reduce lambda func, try to use TSQR