fixing functionality of symmetry function through abstraction of calc_edge function.