added skeleton for triangulation function