exploiting triangular structure