make createEdge function public.