now solving triangles