add edgesTo data structure