modified merge method