Solved problems with adding edges