working on triangulation