added saving and loading triangles functionality