refactored hamming using zip and chars