updating triangle example