Adding ids on edges