fixed edge_find bug and identify substrate