add option for upper/lower triangle