partially working - edge merging