sheet 3: exercise 3 adjust edges instead of creating them again upon merge