further improvement on gaps into deletions (which needs sorting in terms of rendering)