triangle needs debugging