triangulate works ok