Merge algorithm works now