improved name matching algo