modified merge