make triangles functional