update the triangle