Implemented merge and automaticMerge methods