working on edge merging