solving merge