Updated to merge overlapped regions