generate edges properly from fragment. this introduces a BUG
improve printing of fragments
Merge commit 'd69d9cf'