new method has_edge()