changed get_inner_edge()