made the first segment checking character by character matching instead of hash matching