added bothway Edge to functions