Merge with matts logic