method find_node example = 
         (* calculate the distance for all nodes *)
         let mapy x = Array.mapi (fun y -> fun node -> {dist= dist example node.value; coord= {x=x;y=y}}) in
         let evaluated = Array.mapi mapy nodes in
         (* find the one with minimum distance by folding twice *)
         let folder current best = if current.dist < best.dist then current else best in
         (* first fold all all columns (get the best in each column)*)
         let folder2 x arr = Array.fold_right folder arr evaluated.(x).(0) in
         let folded1 = Array.mapi folder2 evaluated in
         (* then fold the resulting array *)
         let folded2 = Array.fold_left folder folded1.(0) folded1 in
         (* we just need the coord *)
         folded2.coord