update second trial of merge-intervals