added uptri flag and diagonal zero-ing, note: breaks tests

added uptri flag and diagonal zero-ing, note: breaks tests